#include <iostream>
#include <string>
#include <boost/python/class.hpp>
#include <boost/python/module.hpp>
#include <boost/python/def.hpp>

#include "python_converters.h"
#include "rule.h"
#include "grammar.h"
#include <vector>


using namespace boost::python;



BOOST_PYTHON_MODULE(fouine)
{

    register_converters();
    
    class_<fouine::Rule>("Rule", no_init)
      .def("test_match", &fouine::Rule::test_match);
    
    def("RegexRule", &fouine::Rule::makeRegexRule);
    def("OrRule", &fouine::Rule::makeOrRule);
    def("SeqRule", &fouine::Rule::makeSeqRule);
    
    class_<fouine::Grammar>("Grammar", init<const std::vector<fouine::Rule>&>());
};
